import Vue from 'vue'
import Router from 'vue-router'
import Login from './views/login/Login.vue'
import Patient from './views/Patient/Patient.vue'
import Patient_Home from './views/Patient/home/Home.vue'
import Patient_Check from './views/Patient/check/Check.vue'
import Patient_Leave from './views/Patient/leave/Leave.vue'
import Patient_Outsick from './views/Patient/outsick/Outsick.vue'
import Patient_Returnsick from './views/Patient/returnsick/Returnsick.vue'
import Patient_State from './views/Patient/state/State.vue'
import Room from './views/Room/Room.vue'
import Room_Manage from './views/Room/home/Home.vue'
import Room_Check from './views/Room/check/Check.vue'
import Check_start from './views/Room/check/Check_start.vue'
import Room_Charge from './views/Room/charge/Charge.vue'
import Room_Record from './views/Room/record/Record.vue'
import Preparation from './views/Preparation/Preparation.vue'
import Preparation_Index from './views/Preparation/index/Index.vue'
import Preparation_Examine from './views/Preparation/examine/Examine.vue'
import Sreach from './views/sreach/Sreach.vue'
Vue.use(Router)

export default new Router({
	// mode: 'history',
	// base: process.env.BASE_URL,
	routes: [
		{
			path: '/login',
			name: 'login',
			component: Login
		},
		{
			path: '/',
			name: 'dashboard',
			redirect: { 
				name: 'patient' 
			}
		},
		{
			path: '/patient',
			name: 'patient',
			redirect: { 
				name: 'patient_home' 
			},
			component: Patient,
			children: [
				{
					path: 'index',
					name: 'patient_home',
					component: Patient_Home
				},
				{
					path: 'check',
					name: 'patient_check',
					component: Patient_Check
				},
				{
					path: 'leave',
					name: 'patient_leave',
					component: Patient_Leave
				},
				{
					path: 'outsick',
					name: 'patient_outsick',
					component: Patient_Outsick
				},
				{
					path: 'returnsick',
					name: 'patient_returnsick',
					component: Patient_Returnsick
				},
				{
					path: 'state',
					name: 'patient_state',
					component: Patient_State
				},
			]
		},
		//手术室
		{
			path: '/room',
			name: 'room',
			redirect: { 
				name: 'room_manage' 
			},
			component: Room,
			children: [
				{
					path: 'index',
					name: 'room_manage',
					component: Room_Manage
				},
				{
					path: 'check',
					name: 'room_check',
					component: Room_Check
				},
				{
					path: 'checkstart',
					name: 'Check_start',
					component: Check_start
				},
				{
					path: 'charge',
					name: 'room_charge',
					component: Room_Charge
				},
				{
					path: 'record',
					name: 'room_record',
					component: Room_Record
				},

			]
		},
		//准备间
		{
			path: '/preparation',
			name: 'preparation',
			redirect: { 
				name: 'preparation_index' 
			},
			component: Preparation,
			children: [
				{
					path: 'index',
					name: 'preparation_index',
					component: Preparation_Index
				},
				{
					path: 'examine',
					name: 'preparation_examine',
					component: Preparation_Examine
				}
			]
		},
		//排班
		{
			path: '/clerk_schedule',
			name: 'clerk_schedule',
		},
		//手术查询
		{
			path: '/sreach',
			name: 'sreach',
			component: Sreach
		},
	]
})
